<?php

// +------------------------------------------------------------------------+
// | AuthPuppy Authentication Server                                        |
// | ===============================                                        |
// |                                                                        |
// | AuthPuppy is the new generation of authentication server for           |
// | a wifidog based captive portal suite                                   |
// +------------------------------------------------------------------------+
// | PHP version 5 required.                                                |
// +------------------------------------------------------------------------+
// | Homepage:     http://www.authpuppy.org/                                |
// | Launchpad:    http://www.launchpad.net/authpuppy                       |
// +------------------------------------------------------------------------+
// | This program is free software; you can redistribute it and/or modify   |
// | it under the terms of the GNU General Public License as published by   |
// | the Free Software Foundation; either version 2 of the License, or      |
// | (at your option) any later version.                                    |
// |                                                                        |
// | This program is distributed in the hope that it will be useful,        |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of         |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          |
// | GNU General Public License for more details.                           |
// |                                                                        |
// | You should have received a copy of the GNU General Public License along|
// | with this program; if not, write to the Free Software Foundation, Inc.,|
// | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.            |
// +------------------------------------------------------------------------+


/**
 * This class has been auto-generated by the Doctrine ORM Framework
 */
class Updatednodes extends Doctrine_Migration_Base
{
    public function up()
    {
        $this->removeColumn('nodes', 'latitude');
        $this->removeColumn('nodes', 'longitude');
        $this->addColumn('nodes', 'description', 'string', '1000', array(
             ));
        $this->addColumn('nodes', 'civic_number', 'string', '20', array(
             ));
        $this->addColumn('nodes', 'street_name', 'string', '150', array(
             ));
        $this->addColumn('nodes', 'city', 'string', '150', array(
             ));
        $this->addColumn('nodes', 'province', 'string', '150', array(
             ));
        $this->addColumn('nodes', 'country', 'string', '150', array(
             ));
        $this->addColumn('nodes', 'postal_code', 'string', '15', array(
             ));
        $this->addColumn('nodes', 'public_phone_number', 'string', '50', array(
             ));
        $this->addColumn('nodes', 'public_email', 'string', '150', array(
             ));
        $this->addColumn('nodes', 'mass_transit_info', 'string', '500', array(
             ));
        $this->addColumn('nodes', 'deployment_status', 'string', '20', array(
             ));
        $this->changeColumn('nodes', 'name', 'string', '150', array(
             'notnull' => '1',
             ));
        $this->changeColumn('nodes', 'gw_id', 'string', '50', array(
             'notnull' => '1',
             'unique' => '1',
             ));
    }

    public function down()
    {
        $this->addColumn('nodes', 'latitude', 'float', '', array(
             ));
        $this->addColumn('nodes', 'longitude', 'float', '', array(
             ));
        $this->removeColumn('nodes', 'description');
        $this->removeColumn('nodes', 'civic_number');
        $this->removeColumn('nodes', 'street_name');
        $this->removeColumn('nodes', 'city');
        $this->removeColumn('nodes', 'province');
        $this->removeColumn('nodes', 'country');
        $this->removeColumn('nodes', 'postal_code');
        $this->removeColumn('nodes', 'public_phone_number');
        $this->removeColumn('nodes', 'public_email');
        $this->removeColumn('nodes', 'mass_transit_info');
        $this->removeColumn('nodes', 'deployment_status');
    }
}